﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;


namespace HustQQServer.DataBase
{
    public class DbManager
    {
        public static string connectString = @"Data Source=192.168.137.144;Initial Catalog=QQDB;User ID=qqadmin;Password=123456";
        public static SqlConnection MyConnection = new SqlConnection(connectString);



        public static bool Connect()
        {
            if (MyConnection != null)
            {
                MyConnection = new SqlConnection(connectString);
                MyConnection.Open();
                return true;
            }
            return false;
        }
        public static bool Disconnect()
        {
            if (MyConnection != null)
            {
                MyConnection.Close();
                return true;
            }
            return false;
        }

    }
}
